The invention relates to a data processing system comprising a processor connected to memory, a user interface, an output interface, and a data storage device, wherein the processor is operable according to program commands directing object-orientated processing. The invention also relates to development of such systems.
Many such systems exist at present. An example is that described in U.S. Pat. No. 5,546,577 to Marlin et al. This system has a service layer within a desktop management interface and which addresses an object orientated database. a system described in U.S. Pat. No. 5,448,727 to Annevelink includes a database interface which calls a query compiler and an optimiser. These compile a query tree into a run tree which is queried by a query interpreter block. A memory cache is used during a database access. A system described in U.S. Pat. No. 5,297,279 to Bannon et al has an object manager for retrieving objects and controlling internal objects. A system described in WO9500901 (Taligent) includes a database which stores components and properties and a compiler which calculates dependencies.
While the presently available systems are generally quite effective, there are some limitations in their operation. For example, complex control is often required to achieve consistency and integrity of data when different objects are performing transaction processing using data from the same database. Also, the response time for database fetch cycles can cause delays in processing, particularly for complex systems with many interrelated objects.
Another problem at present is that development of such systems is a complex and timeconsuming task.
It is an object of the invention to provide a data processing system of the type set out above which performs data retrieval more efficiently, ensures a greater level of data consistency across all objects, and which ensures data integrity to a greater extent.
There is also a need for a method for developing such systems which allows a shorter lead time than has been the case in the past.
According to the invention, there is provided a data processing system comprising a processor connected to memory, a user interface, an output interface, and a data storage device storing a database, wherein the processor is operable according to program commands directing object-oriented processing, wherein
the processor operates as directed by a work flow activity object for transaction data processing, as directed by a user interface object for user interfacing, and as directed by a data management state machine for interaction with the data storage device;
an object is operable to direct creation of an instance of the state machine for each transaction;
the work flow activity object is operable to request a primitive object from the state machine when data is required; and
the state machine is operable to access a database and to build a primitive object corresponding to each data request, each primitive object being operable in conjunction with a work flow activity object to perform transaction processing.
The state machine performs a very important role in operation of the system. It allows the work flow activity objects to maintain transaction processing control, however, it divorces these objects from the database because they simply request an object and do not know the source of the data. Also, because data is supplied as an object, these objects may then be used in subsequent processing by work flow activity objects. This allows substantially improved processing efficiency.
In one embodiment, the database has a relational table structure, and the state machine is operable to build a primitive object associated with a single table row. This provides a link between the primitive objects and the database which is very simple and effective. Preferably, each work flow activity object is operable to pass a primitive object identifier to the state machine to request data, and the state machine is operable to build the primitive object by instantiating a primitive object class. Ideally, the database includes one relational database table per primitive object class.
In one embodiment, the state machine is operable to store a reference to each primitive object in a temporary stack and to pass the reference to the requesting work flow activity object. In this latter embodiment, the state machine is preferably operable to search the stack for an existing required primitive object before building a fresh primitive object. These features allow more efficient data retrieval because it is not necessary to access the database with a fetch cycle each time a data record is to be retrieved. They also help to ensure integrity of data because the original primitive object is maintained in the stack and is never copied, only a reference being returned to the requesting work flow activity object.
In one embodiment, each work flow activity object is operable to pass a data extract to the user interface object, and the user interface object is operable to manipulate the data extract and to request the source work flow activity object to validate the data manipulation. Preferably, the user interface object is operable to initiate a transaction termination by instructing the state machine to perform a transaction commit.
In another embodiment, the state machine is operable to flush all modified primitive objects of the stack to the database for a transaction commit. Thus, the unit of time for the primitive object stack maintained by the state machine is a single transaction and there is a complete update when this is complete. Again, this helps to ensure data integrity in the system.
In another embodiment, each primitive object is operable to automatically notify the state machine when updated. This feature allows the primitive objects to be updated by the work flow activity objects without sacrificing data integrity. The work flow activity objects do not need to become involved in ensuring that the update takes place as it is performed automatically by the primitive object.
In one embodiment, each work flow activity object is operable to instruct the state machine to handle an embedded transaction, and the state machine is programmed to respond by creating a new instance for the embedded transaction. This allows handling of complex transaction processing in a simple manner.
In one embodiment, the state machine is operable to validate completion of all lower-level instances before terminating a transaction. This mechanism provides nesting of the primitive object stacks in a simple manner which ensures data integrity.
According to another aspect, the invention provides a data processing system development method comprising the steps of:
developing a core persistent object model comprising relational database tables and a primitive object class associated with each table, the class being instantiated by retrieval of a row from the associated table;
developing user interface and work flow activity classes;
instantiating the user interface class by operator interaction to create user interface objects;
user interface objects instantiating work flow activity objects; and
work flow activity objects requesting a state machine to build a primitive object, and the state machine retrieving a data row and using it to build the primitive object.
The core persistent object model is a simple and well-ordered structure which links data with objects to allow building of primitive objects for testing as the work flow activity objects perform data processing. This dramatically reduces the time involved for building the primitive objects. Also, because the work flow activity objects do not access the database, the nature of the database is transparent and this allows the work flow activity objects to have simpler code which is more easily developed and tested.
In one embodiment, the work flow activity objects transfer a primitive object identifier to the state machine as part of the request.
Preferably, the state machine maintains a temporary stack of object references for a transaction and passes object references from the stack for subsequent requests.